<link rel="stylesheet" href="app/wiki/css/wiki.css" type="text/css"/>

<div ng-controller="Wiki.HistoryController">
  <script type="text/ng-template" id="changeCellTemplate.html">
    <div class="ngCellText">
      <a class="commit-link" ng-href="{{row.entity.commitLink}}{{hash}}" title="{{row.entity.name}}">{{row.entity.commitHashText}}
        <i class="icon-circle-arrow-right"></i></a>
    </div>
  </script>

  <div ng-hide="inDashboard" class="logbar" ng-controller="Wiki.NavBarController">
    <div class="wiki logbar-container">
      <ul class="nav nav-tabs">
        <li ng-show="branches.length || branch" class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"
             title="The branch to view">
            {{branch || 'branch'}}
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
            <li ng-repeat="otherBranch in branches">
              <a ng-href="{{branchLink(otherBranch)}}{{hash}}"
                 ng-hide="otherBranch === branch"
                 title="Switch to the {{otherBranch}} branch"
                 data-placement="bottom">
                {{otherBranch}}</a>
            </li>
          </ul>
        </li>
        <li ng-repeat="link in breadcrumbs">
          <a ng-href="{{link.href}}{{hash}}">{{link.name}}</a>
        </li>
        <li class="ng-scope active">
          <a>History</a>
        </li>

        <li class="pull-right" hawtio-show object-name="{{gitMBean}}" method-name="write">
          <a ng-href="{{editLink()}}{{hash}}" ng-hide="!editLink()" title="Edit this page"
             data-placement="bottom">
            <i class="icon-edit"></i> Edit</a></li>
        <li class="pull-right">
          <a ng-href="{{historyLink}}{{hash}}" ng-hide="!historyLink" title="View the history of this file"
             data-placement="bottom">
            <i class="icon-comments-alt"></i> History</a></li>
        <li class="pull-right" hawtio-show object-name="{{gitMBean}}" method-name="write">
          <a ng-href="{{createLink()}}{{hash}}" title="Create new page"
             data-placement="bottom">
            <i class="icon-plus"></i> Create</a></li>
      </ul>
    </div>
  </div>

  <div class="wiki-fixed row-fluid">
    <div class="span4">
      <div class="control-group">
        <button class="btn" ng-disabled="!gridOptions.selectedItems.length" ng-click="diff()"
                title="Compare the selected versions of the files to see how they differ"><i
                class="icon-exchange"></i>
          Compare
        </button>

        <button class="btn" ng-disabled="!canRevert()" ng-click="revert()"
                title="Revert to this version of the file" hawtio-show object-name="{{gitMBean}}" method-name="revertTo"><i class="icon-exchange"></i> Revert
        </button>
      </div>
    </div>
    <div class="span8">
      <div class="control-group">
        <input class="span12 search-query" type="text" ng-model="gridOptions.filterOptions.filterText"
               placeholder="search">
      </div>
    </div>
  </div>

  <div class="form-horizontal">
    <!--
        <div class="row-fluid">
            <div class="gridStyle" ng-grid="gridOptions"></div>
        </div>
    </div>-->

    <div class="row-fluid">
      <table class="table-condensed table-striped" hawtio-simple-table="gridOptions"></table>
    </div>

  </div>
</div>
